package game.sprite.collision;

import game.physics.GameVector;
import java.awt.Shape;


/**
 * @author Paul
 *         Any sprite that can receive a collision should implement collidable.
 * 
 * 
 */
public interface ICollidable {

    /**
     * Applies a force to the object.
     * 
     * @param force The force to apply.
     */
    void applyForce (GameVector force);

    /**
     * 
     * @return The Shape representing the outline of
     *         the object.
     */
    Shape getOutline ();

    /**
     * 
     * @return The behavior associated with this object that
     *         determines its behavior when a collision with another
     *         object occurs.
     */
    CollisionBehavior getCollisionBehavior ();

    /**
     * Sets the CollisionBehavior that is to be associated with this
     * object. When this object collides with another ICollidable, its
     * behavior will be determined by the particular CollisionBehavior
     * class that is set here.
     * 
     * @param collisionBehavior The behavior that this object should have
     *        during collisions.
     */
    void setCollisionBehavior (CollisionBehavior collisionBehavior);

    /**
     * Passes a reference of another ICollidable to
     * this object. This allows this ICollidable to
     * call the passed object's methods and pass
     * itself through as an argument. This is part
     * of the implementation of the Visitor Pattern.
     * 
     * 
     * 
     * @param collidable The object whose methods this
     *        class should call. Often, (but not always),
     *        this call will resemble
     *        collidable.getCollisionBehavior().visit(this)
     */
    void accept (ICollidable collidable);

    /**
     * 
     * @return A vector representing the collidable's
     *         current velocity.
     */
    GameVector getVelocity ();

}
